#ifndef __SLAVE_SENSOR_H
#define __SLAVE_SENSOR_H

#include "Util.h"

typedef struct{
	formatTrans16Struct_t	errorFlag;
	coordinateUnion_t 		gyo_int;
	coordinateUnion_t 		acc_int;
	coordinateFloat_t			gyo_f;
	coordinateFloat_t			acc_f;
	formatTrans16Struct_t temp;
	formatTrans16Struct_t	dataCNTR;
	u8										checkSum;
}
adis16470Data_t;

typedef struct{
	u8 seq;
	adis16470Data_t slaveImuData;
	u32 checkSeq;
	u32 slaveErrorCount;
	u32 slaveLastErrorCount;
  u32 intervalNum;	
	bool initFlag;
} slaveSensorStruct_t;

extern slaveSensorStruct_t slaveSensorData;

void adis16470DataUpdate(void);
void slaveSensorRead(u8 *arraySlaveSensor);
void commandUpload(void);
void slaveSensorConfig(void);

#endif
